import api.spliteExcel;
import mapper.mysqlMapper;
import org.apache.ibatis.session.SqlSession;
import utils.MapperUtil;

public class App {

    /**
     * @author: hxc
     * @dateTime: 2021/11/18
     * @description: 启动类
     *
     * */
//调用数据库工具类并实例化创建excel方法
    private static SqlSession session;
    private static mysqlMapper mapper;
    private static spliteExcel splite;

    private static void close(){
        if(session !=null){
            session.close();
        }
    }

    public static void main(String[] args) {
        session= MapperUtil.sqlSessionFactory_mysql.openSession();
        mapper=session.getMapper(mysqlMapper.class);

        splite=new spliteExcel();
        try{
            spliteExcel.spliteExcel(mapper);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
